package com.lin.activity;

import com.yunfeng.supercall.R;

import android.app.Activity;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.FrameLayout;
import android.widget.TextView;

public class AboutActivity extends Activity implements OnClickListener{

	private FrameLayout mFrameLayoutBack;

	PackageManager manager;

	PackageInfo info = null;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_about);
		mFrameLayoutBack = (FrameLayout) findViewById(R.id.framelayout_back);
		TextView mTextViewVersion =(TextView) findViewById(R.id.textview_version);
		mFrameLayoutBack.setOnClickListener(this);
		manager = this.getPackageManager();
		//
		try {

			info = manager.getPackageInfo(this.getPackageName(), 0);
//			mTextViewVersion.setText("版本号: " + info.versionCode + "");
			mTextViewVersion.setText("版本号: " + info.versionName + "");
		} catch (NameNotFoundException e) {

			// TODO Auto-generated catch block

			e.printStackTrace();

		}
		//		

	}

	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		finish();
	}

}